package com.gnerv.sylvanas.business.manage.repository.mapper;

import com.gnerv.sylvanas.business.manage.model.entity.Dict;
import com.gnerv.sylvanas.business.manage.model.vo.DictDetailsVO;
import com.gnerv.sylvanas.business.manage.model.vo.DictVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Gnerv LiGen
 */
@Mapper
public interface DictMapper {

    int insert(@Param(value = "dict") Dict dict);

    int deleteByUkId(@Param(value = "ukId") String ukId);

    int updateByUkId(@Param(value = "dict") Dict dict);

    DictVO selectVOByUkId(@Param(value = "ukId") String ukId);

    List<DictVO> selectListVOByName(@Param(value = "name") String name);

    DictDetailsVO selectDetailsVOByUkId(@Param(value = "ukId")  String ukId);

    DictDetailsVO selectDetailsVOByCode(@Param(value = "code") String code);

    List<DictDetailsVO> selectListDetailsVOByName(@Param(value = "name") String name);

    int selectCountByCode(@Param(value = "code") String code);

    int selectCountByDictCodeAndItemValue(@Param(value = "dictCode") String dictCode,
                                      @Param(value = "itemValue") String itemValue);

    List<DictVO> selectListVOByName(@Param(value = "name") String name,
                                    @Param(value = "limitStart") int limitStart,
                                    @Param(value = "limitSize") int limitSize);

    int selectCountByName(@Param(value = "name") String name);

    List<DictDetailsVO> selectListDetailsVOByCode(@Param(value = "codeList") List<String> codeList);
}




